package com.pj.android.brower.push

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.pj.android.brower.ui.WebActivity

class NotificationClickReceiver : BroadcastReceiver() {
    private val tag = "NotificationClickReceiver"

    override fun onReceive(context: Context, intent: Intent) {
        if (intent.action == "open_url") { //病人增加医嘱
            val newIntent = Intent(context, WebActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            val name = intent.getStringExtra("url")

            newIntent.putExtra("url", name)
            context.startActivity(newIntent)
        }
    }
}
